<?php defined('SYSPATH') or die('No direct access allowed.');

class Model_News extends ORM
{
    protected $_db = 'default';
    protected $_table_name = 'news';
    
    public function rules()
    {
         return array(
            'href' => array(
                array('not_empty'),
                array('regex', array(':value', '|^[a-zA-Z0-9а-яА-Я\-\/]+$|u'))
            ),
            'html_title' => array(
                array('not_empty'),    
            ),
            'html_description' => array(
                array('max_length', array(':value', 250)),    
            ),
            'html_keywords' => array(
                array('max_length', array(':value', 250)),    
            ), 
            'content' => array(
                array('not_empty'),
            ),
        );
    }
}